<?php 

defined( '_JEXEC' ) or die( 'Restricted Access' );
jimport( 'joomla.application.component.view' );

class ShopViewNew_Category extends JView
{
	function display( $tmpl = null )
    {
		$model = $this->getModel();
		$id = JRequest::getVar('id', JRequest::getVar('cid'));

        if (is_array($id)) {
            $id = $id[0];
        }
		JToolBarHelper::title(JText::_('Категория товаров'),'generic.png');
        JToolBarHelper::save('saveCat');
		JToolBarHelper::cancel('cancelCat');
		
		$db = &JFactory::getDBO();
		
		$editor = & JFactory::getEditor();
		$this->assignRef("editor",$editor);
		
		
		if($id!=0)
		{
			$model->setId($id);
			$item = $model->getData();
			$this->assignRef('item', $item);
		}
				
		parent::display($tmpl);
		
	}
}
?>